using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Daniel.Core.Models.Mapping
{
    public class TopicMap : EntityTypeConfiguration<Topic>
    {
        public TopicMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            // Table & Column Mappings
            this.ToTable("Topic");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.SystemName).HasColumnName("SystemName");
            this.Property(t => t.IncludeInSitemap).HasColumnName("IncludeInSitemap");
            this.Property(t => t.IsPasswordProtected).HasColumnName("IsPasswordProtected");
            this.Property(t => t.Password).HasColumnName("Password");
            this.Property(t => t.Title).HasColumnName("Title");
            this.Property(t => t.Body).HasColumnName("Body");
            this.Property(t => t.MetaKeywords).HasColumnName("MetaKeywords");
            this.Property(t => t.MetaDescription).HasColumnName("MetaDescription");
            this.Property(t => t.MetaTitle).HasColumnName("MetaTitle");
            this.Property(t => t.LimitedToStores).HasColumnName("LimitedToStores");
            this.Property(t => t.DisplayOrder).HasColumnName("DisplayOrder");
            this.Property(t => t.CategoryName).HasColumnName("CategoryName");
        }
    }
}
